﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

using Microsoft.Practices.Prism.UnityExtensions;
using Microsoft.Practices.Prism.Modularity;
using System.Collections.ObjectModel;
using Microsoft.Practices.Unity;
using DIST.LR.ZHJG.Silverlight;
using DIST.LR.ZHJG.Controls.Grid;
using DIST.LR.ZHJG.Controls.Chart;

namespace DIST.LR.ZHJG
{
    public class PGYBCBootstrapper : UnityBootstrapper
    { 
        protected override DependencyObject CreateShell()
        {
            //return Container.Resolve<ucPie>();
            return Container.Resolve<HzShell>();
            
        }
     
        //  控制页面在初始化时显示Shell页面
        protected override void InitializeShell()
        {
            base.InitializeShell();
            
            App.Current.RootVisual = (UIElement)this.Shell;
        }

          
        //  注册Module,在实际开发中可以使用xaml做配置文件，
        protected override void ConfigureModuleCatalog()
        {
            base.ConfigureModuleCatalog();

            Type banner = typeof(DIST.LR.ZHJG.Navigation.FloatNavigationModule);
            ModuleInfo module_View = new ModuleInfo
            {
                ModuleName = banner.Name,
                ModuleType = banner.AssemblyQualifiedName,
            };

            this.ModuleCatalog.AddModule(module_View);

            Type summary = typeof(DIST.LR.ZHJG.Utility.SummaryModule);
            ModuleInfo module_summary = new ModuleInfo
            {
                ModuleName = summary.Name,
                ModuleType = summary.AssemblyQualifiedName,
            };

            this.ModuleCatalog.AddModule(module_summary);

            Type statistic = typeof(DIST.LR.ZHJG.Utility.Statistic.StatisticCommonModule);
            ModuleInfo module_statistic = new ModuleInfo
            {
                ModuleName = statistic.Name,
                ModuleType = statistic.AssemblyQualifiedName,
            };

            this.ModuleCatalog.AddModule(module_statistic);
        }


        //  注册服务(类)
        protected override void ConfigureContainer()
        {
            base.ConfigureContainer();
		}

    }
}
